﻿'******************************************************
'******************************************************
'Application Title: Google Widget Editor
'version: 1.0
'Date: 01-02-2008
'Requirements: win2k or later
'Author: Andrew Pye
'Author Email: StretchMasterP@googlemail.com
'License: Released under GNU GENERAL PUBLIC LICENSE v3
'ToDo:
'Changes:Imports System.Text
'******************************************************
'******************************************************

Imports System.Xml.Serialization
''' <summary>
''' Handle Global Settings
''' </summary>
''' <remarks></remarks>
Public Class ClassGlobal
#Region "Fields"
    Private _FTPSettings As New ClassFTPSettings
    Private _Help As New HelpFileCollection
    Private _Java As New ClassJavaList
#End Region

#Region "FTP Settings"
    ''' <summary>
    ''' Loads Setting sfor ftp
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub loadFTPSettings(ByVal filename As String)
        If My.Computer.FileSystem.FileExists(filename) = True Then
            Dim string_reader As IO.StringReader
            Dim Tstr As String = My.Computer.FileSystem.ReadAllText(filename)
            Dim xml_serializer As New XmlSerializer(GetType(ClassFTPSettings))
            ' Make a StringReader holding the serialization.
            string_reader = New IO.StringReader(Tstr)
            ' Create the new Person object from the serialization.
            Me.FTPSettings = xml_serializer.Deserialize(string_reader)
        Else
            Me.FTPSettings = New ClassFTPSettings
        End If
    End Sub
    Public Property FTPSettings() As ClassFTPSettings
        Get
            Return _FTPSettings
        End Get
        Set(ByVal value As ClassFTPSettings)
            _FTPSettings = value
        End Set
    End Property
#End Region

#Region "Java"
    Public Property JavaList() As ClassJavaList
        Get
            Return _Java
        End Get
        Set(ByVal value As ClassJavaList)
            _Java = value
        End Set
    End Property
#End Region
   
#Region "Help"
    Public Property Help() As HelpFileCollection
        Get
            Return _Help
        End Get
        Set(ByVal value As HelpFileCollection)
            _Help = value
        End Set
    End Property
#End Region







End Class
